<%--
  Created by IntelliJ IDEA.
  User: ZTencent
  Date: 2022/12/29
  Time: 21:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fm" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link href="${pageContext.request.contextPath}/statics/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/css/style.css"/>
    <link href="${pageContext.request.contextPath}/statics/assets/css/codemirror.css" rel="stylesheet">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/assets/css/ace.min.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/font/css/font-awesome.min.css" />
    <!--[if lte IE 8]>
    <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
    <![endif]-->
    <script src="${pageContext.request.contextPath}/statics/js/jquery-1.9.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/statics/assets/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/statics/assets/js/typeahead-bs2.min.js"></script>
    <script src="${pageContext.request.contextPath}/statics/assets/layer/layer.js" type="text/javascript" ></script>
    <script src="${pageContext.request.contextPath}/statics/assets/laydate/laydate.js" type="text/javascript"></script>
    <title>商户审核</title>
</head>

<body>
<div class="margin clearfix">
    <div class="detailed_style clearfix">
        <em class="type"></em>
        <div class="shop_logo"><img src="${pageContext.request.contextPath}/statics/upload/business/${fm:split(b.bimg,",")[0]}" width="200px" height="150px" /></div>
        <ul class="shop_content clearfix" style="height: 100px">
            <li class="shop_name"><label class="label_name">店铺名称：</label><span class="info">${b.bname}</span></li>
            <li><label class="label_name">店铺类型：</label><span class="info">${b.mc.mcName}</span></li>
            <li><label class="label_name">状&nbsp;&nbsp;&nbsp;&nbsp;态：</label><span class="info">${b.bactive?"已审核":"未审核"}</span></li>
            <li><label class="label_name">账户名：</label><span class="info">${b.bloginName}</span></li>
        </ul>
        <ul class="shop_content" style="height: 50px">

            <li><label class="label_name">移动电话：</label><span class="info">${b.phone}</span></li>
            <li style="width: 400px"><label class="label_name">地址：</label><span class="info">${b.address}</span></li>
            <li><label class="label_name">营业时段：</label><span class="info">${b.btimeSlot}</span></li>
        </ul>
    </div>
    <div class="Store_Introduction">
        <div class="title_name">商户介绍</div>
        <div class="info">
            ${b.bdesc}
        </div>
    </div>
    <div class="Store_Introduction">
        <div class="title_name">商户图片</div>
        <div class="info">
            <c:forEach var="img" items='${fm:split(b.bimg,",")}'>
                <a href="${img}"><img src="${pageContext.request.contextPath}/statics/upload/business/${img}" width="200px" height="100px"/></a>
            </c:forEach>
        </div>
    </div>
    <div class="Store_Introduction">
        <div class="title_name">商户资质</div>
        <div class="info">
            <c:forEach var="img" items='${fm:split(b.qualifications,",")}'>
                <img src="${pageContext.request.contextPath}/statics/upload/business/${img}" width="200px" height="100px"/>
            </c:forEach>
        </div>
    </div>
    <div class="At_button">
        <button onclick="through_save(${b.bid});" class="btn btn-primary radius" type="submit">通  过</button>
        <button onclick="cancel_save(${b.bid});" class="btn btn-danger  btn-warning" type="button">冻  结</button>
    </div>
</div>
</body>
<script>
    function through_save(id) {
        $.getJSON("${pageContext.request.contextPath}/manager/business/updateBactive",{"bid":id,"bactive":1},function (e) {
            if(e.code==200){
                // layer.msg(e.message);
                alert(e.message)
                location.href="${pageContext.request.contextPath}/manager/business/list?pageindex=1";
            }
        })
    }

    function cancel_save(id) {
        $.getJSON("${pageContext.request.contextPath}/manager/business/updateBactive",{"bid":id,"bactive":0},function (e) {
            if (e.code==200){
                alert(e.message);
                location.href="${pageContext.request.contextPath}/manager/business/list?pageindex=1";
            }else{
                alert(e.message);
            }
        })
    }
</script>
</html>

